package com.wyl.mine


import android.view.View
import com.wyl.base.PublishTypePage
import com.wyl.libbase.base.BaseFragment
import com.wyl.libbase.extend.onclick
import com.wyl.libbase.extend.openActivity
import com.wyl.mine.friends.LikeListActivity
import com.wyl.mine.unique.AuthenticationActivity
import com.wyl.mine.unique.assets.AssetsActivity
import com.wyl.mine.unique.assets.MedalActivity
import com.wyl.mine.unique.credit.CreditActivity
import com.wyl.mine.unique.evaluate.EvaluateMineActivity
import com.wyl.mine.userinfo.UserInfoActivity
import com.wyl.mine.wallet.IncomeActivity
import com.wyl.mine.wallet.WalletActivity
import kotlinx.android.synthetic.main.mine_fragment.*


class MineFragment : BaseFragment() {
    override fun getLayoutId(): Int = R.layout.mine_fragment

    override fun initView(view: View) {
//        titleBar.setListener { _, action, _ ->
//            when (action) {
//                CommonTitleBar.ACTION_RIGHT_BUTTON -> openActivity(MessagePage)
//                else -> {
//                }
//            }
//        }

        header.onclick { openActivity(UserInfoActivity::class.java) }
        group_like.onclick {
            openActivity(LikeListActivity::class.java) {
                putExtra(
                    "title",
                    "关注"
                )
            }
        }
        group_fans.onclick {
            openActivity(LikeListActivity::class.java) {
                putExtra(
                    "title",
                    "粉丝"
                )
            }
        }

        gold_layout.onclick { openActivity(AssetsActivity::class.java) }
        medal_layout.onclick { openActivity(MedalActivity::class.java) }

        wallet_layout.onclick { openActivity(WalletActivity::class.java) }

        authentication_layout.onclick { openActivity(AuthenticationActivity::class.java) }

        assets.onclick { openActivity(AssetsActivity::class.java) }
        income.onclick { openActivity(IncomeActivity::class.java) }
        credit2.onclick { openActivity(CreditActivity::class.java) }
        evaluate.onclick { openActivity(EvaluateMineActivity::class.java) }

        evaluate.onclick { openActivity(PublishTypePage) }

    }

    override fun loadData() {

    }

}
